public class Bus {
    private final int maxPeople = 50 ;
    public static int countPeople = 0 ;

    public Bus() {
    }

    public Bus(int people) {
        //当前公交车有多少人
        countPeople = people;
    }

    public void takeOff(int peopleNum){
        countPeople -= peopleNum;
        //return countPeople;
    }

    public void takeOn(int peopleNum){
        countPeople += peopleNum;

    }

    public static int getCountPeople() {
        return countPeople;
    }

    public static void setCountPeople(int countPeople) {
        Bus.countPeople = countPeople;
    }

}
